package com.xdf.whiteaccount.service;
import com.xdf.whiteaccount.utils.Example;
import com.xdf.whiteaccount.entity.GjrkbilldraftCpDetail;
import java.util.List;
import java.util.Optional;

/**
 * 版本号：20240401
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2025-8-2 9:55:00
 */
public interface GjrkbilldraftCpDetailService {
    GjrkbilldraftCpDetail insert(GjrkbilldraftCpDetail record);

    GjrkbilldraftCpDetail insertSelective(GjrkbilldraftCpDetail record);

    List<GjrkbilldraftCpDetail> multiInsert(List<GjrkbilldraftCpDetail> list);

    int updateByPrimaryKey(GjrkbilldraftCpDetail record);

    int updateByPrimaryKeySelective(GjrkbilldraftCpDetail record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    GjrkbilldraftCpDetail selectByPrimaryKey(Integer id);
    // 根据主键作废
    int setVoid(Integer id);

    List<GjrkbilldraftCpDetail> selectAll();

    GjrkbilldraftCpDetail save(GjrkbilldraftCpDetail record);
    List<GjrkbilldraftCpDetail> multiSave(List<GjrkbilldraftCpDetail> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(GjrkbilldraftCpDetail record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default GjrkbilldraftCpDetail fullFill(GjrkbilldraftCpDetail record){
        return record;
    }

    default void doBeforeInsert(GjrkbilldraftCpDetail record){}
    default void doAfterInsert(GjrkbilldraftCpDetail record){}
    List<GjrkbilldraftCpDetail> selectByExample(Example<GjrkbilldraftCpDetail> example);
    GjrkbilldraftCpDetail moveBill(Integer id, String moveBillFlag);
    //=================以上是自动生成的代码，自定义代码请写在下面==================
}